#include <stdio.h>

int main(int argc, char *argv[])
{

    int scores = 0;
    while (scanf("%d", &scores) != EOF)
    {
        if (scores>=90&&scores<=100)
            printf("A\n");
        else if (scores >= 80 && scores <= 89)
            printf("B\n");
        else if (scores >= 70 && scores <= 79)
            printf("C\n");
        else if (scores >= 60 && scores <= 69)
            printf("D\n");
        else if(scores>=0&&scores<=59)
            printf("E\n");
        else
            printf("Score is error!\n");
    }

    return 0;
}